#ifndef _H_1_ITERATOR
#define _H_1_ITERATOR
struct input_iterator_tag{};

struct output_iterator_tag{};

struct forward_iterator_tag:public input_iterator_tag{};

struct bidirectional_iterator_tag:public forward_iterator_tag{};

struct random_access_iterator_tag:public bidirectional_iterator_tag{};

template <typename Iterator>
struct iterator_traits_1{
	typedef typename Iterator::iterator_category iterator_category;
	typedef typename Iterator::value_type value_type;
	typedef typename Iterator::difference_type difference_type;
	typedef typename Iterator::pointer pointer;
	typedef typename Iterator::reference reference;
};

template <typename T>
struct iterator_traits_1<T*>{
	typedef random_access_iterator_tag iterator_category;
	typedef T value_type;
	typedef ptrdiff_t difference_type;
	typedef T* pointer;
	typedef T& reference;
};

template <typename T>
struct iterator_traits_1<const T*>{
	typedef random_access_iterator_tag iterator_category;
	typedef T value_type;
	typedef ptrdiff_t difference_type;
	typedef const T* pointer;
	typedef const T& reference;
};

template <typename Category,
		typename Value,
		typename Difference = ptrdiff_t,
	   	typename Pointer = Value*,
		typename Reference = Value&>
struct  iterator_1{
	 typedef Category iterator_category;
	 typedef Value value_type;
	 typedef Difference difference_type;
	 typedef Pointer pointer;
	 typedef Reference reference;
};

template <typename ForwardIterator1,typename ForwardIterator2>
void iter_swap_1(ForwardIterator1 p,ForwardIterator2 q){
	typename iterator_traits_1<ForwardIterator1>::value_type tmp = *p;
	*p = *q;
	*q = tmp;
}


template <typename Arg,typename Result>
struct unary_function_1{
	typedef Arg argument_type;
	typedef Result result_type;	
};

template <typename Arg1,typename Arg2,typename Result>
struct binary_function_1{
	typedef Arg1 first_argument_type;
	typedef Arg2 second_argument_type;
	typedef Result result_type;
};

template <typename T>
struct even_1:public unary_function_1<T,bool>{
		bool operator()(T x){return  (x&1) == 0;}

};



#endif
